package cjq.demo.thread.ch4_12;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * Created by Administrator on 2016/5/1.
 */
public class RejectedTaskController implements RejectedExecutionHandler {
    public void rejectedExecution(Runnable r,ThreadPoolExecutor executor){
        System.out.println("RejectedTaskController : the task "+r.toString()+" has been rejected ");
        System.out.println("RejectedTaskController : "+executor.toString());
        System.out.println("RejectedTaskController : Terminating : "+executor.isTerminating());
        System.out.println("RejectedTaskController: Terminated : "+executor.isTerminated());
    }
}
